package org.qiyu.live.im.core.server.service;

import org.qiyu.live.im.dto.ImMsgBody;

/**
 * @ClassName: IMsgAckCheckService
 * @Description: TODO
 * @Author zhangguangyan
 * @Date 2023/10/03/ 00:39:25
 * @Version 1.0
 */
public interface IMsgAckCheckService {
    /**
     * @Description 主要是客户端发送ack包到服务端后, 调用进行ack记录移除
     * @Author zhangguangyan
     * @Date 2023-10-03 00:44:15
     */
    void doMsgAck(ImMsgBody imMsgBody);

    /**
     * @Description 记录下消息的ack和times
     * @Author zhangguangyan
     * @Date 2023-10-03 00:44:56
     */
    void recordMsgAck(ImMsgBody imMsgBody,int times);

    /**
     * @Description 发送延迟消息, 用于进行消息重试
     * @Author zhangguangyan
     * @Date 2023-10-03 00:45:14
     */
    void sendDelayMsg(ImMsgBody imMsgBody);

    /**
     * @Description 获取ack消息的重试次数
     * @Author zhangguangyan
     * @Date 2023-10-03 00:46:32
     */
    int getMsgAckTimes(String msgId,long userId, int appId);
}
